<template>
  <div>
    <h1>{{ msg }}</h1>
    <button @click="rev">点击翻转</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "闫进胡达赵磊",
    };
  },

  methods: {
    rev() {
      const arr = this.msg.split("");
      this.msg = arr.reverse().join("");
    },
  },
};
</script>

<style>
</style>